Rename eaco to eaco-abac#25
Open
iamaestimo wants to merge 8 commits into
Open
Conversation
Adapter support for modern Rails was the blocker: Eaco's Active Record compatibility layer only knew versions up to 6.1 and hard-failed with "Unsupported Active Record version" on anything newer, so the gem never actually ran on Rails 7+. Add compat modules V70-V81 (mirroring V61's Scoped + Sanitized behaviour) and register their autoloads. Make the suite green on Ruby 4.0: - Add ostruct dev dependency (no longer a default gem on Ruby 3.5/4.0; required by Cucumber). - Derive ACL#inspect / #pretty_inspect spec expectations from Ruby's own Hash formatting (Ruby 3.4+ adds spaces around `=>`). - Relax the SyntaxError expectation for the Prism parser (Ruby 4.0). - Remove .config/cucumber.yml: Cucumber 3.x crashes loading profiles via the removed ERB.new positional API on Ruby 3.4+. Drop legacy support and rework the test matrix: - Floor at Ruby 3.2 / Rails 7.2; remove Rails 3.2-7.1 gemfiles and trim Appraisals; add rails_8.0 and rails_8.1 gemfiles. - Rewrite CI matrix to Ruby 3.2-4.0 x Rails 7.2/8.0/8.1; fix master->main triggers. - Set required_ruby_version >= 3.2, add gem metadata, bump to 2.0.0.beta1. Reposition the README around authentication-vs-authorization and add a comparison vs Pundit/CanCanCan/Action Policy. Add PROJECT_TRACKER.md as the working hub for the v2.0 effort. Local result (Ruby 4.0.5 + PG 18): RSpec 21/0, Cucumber 33/33 on Rails 7.2.3, 8.0.5 and 8.1.3. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Cucumber 3.2.0 (2018) only limped along on Ruby 4.0 and crashed loading profiles via the removed ERB.new positional API. Upgrade to Cucumber 11. The unmaintained yard-cucumber plugin was the hard blocker: it pins cucumber < 4. Drop it (and its `--plugin cucumber` in .yardopts); a proper docs site is the Phase 3 plan anyway. guard-cucumber 3.0.0 has no upper bound on cucumber and is unaffected. No step-definition or World/hook changes were required -- the suite only uses `World do` and `Before do`, both unchanged. Silence the report- publishing banner in CI via CUCUMBER_PUBLISH_QUIET. Green on Rails 7.2/8.0/8.1 under Ruby 4.0: RSpec 21/0, Cucumber 33/33. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
…flow Coverage: replace the unmaintained coveralls gem with plain SimpleCov. Remove the dead Travis-only coverage-upload path (report_coverage / running_in_travis?) from the default Rake task; CI already runs the matrix directly. Drop the coveralls badge. Railtie: use config.enable_reloading instead of the deprecated config.cache_classes, and drop the pre-7.x ActionDispatch::Reloader fallback now that the floor is Rails 7.2. Add frozen_string_literal magic comment to all of lib/ (56 files). No in-place string mutations existed, and the suite stays green. Add a Release workflow that publishes the gem on version tags via RubyGems Trusted Publishing (OIDC, no stored API key). Requires a one-time trusted-publisher registration on rubygems.org before the first release. Re-validated green on Rails 7.2/8.0/8.1 under Ruby 4.0: RSpec 21/0, Cucumber 33/33 each. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Validated eaco inside a freshly generated Rails 8.1 app (minimal app, gem via path:). Two real-world bugs surfaced and are fixed here: * The Railtie called Eaco.parse_default_rules_file! directly in its initializer. On Rails 7+ (Zeitwerk-only) application constants cannot be autoloaded during boot, so any config/authorization.rb referencing a model raised NameError and the app could not start. Rules are now parsed from app.config.to_prepare, which runs once after boot and again on each code reload in development — replacing both the direct call and the enable_reloading branch. * Adapters::ActiveRecord.included guarded schema validation with table_exists?, but on modern Rails that raises ActiveRecord::NoDatabaseError when the database is missing, breaking the very rails db:create that would create it. The check is now skipped when the database is unreachable. Smoke test (grant/revoke, can?, accessible_by, admin bypass, jsonb persistence, controller integration) passes 11/11 in both lazy and eager-load boot; RSpec 21/0 and Cucumber 33/33 re-validated on Rails 7.2 / 8.0 / 8.1. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Phase 1: Rails 7.2–8.1 & Ruby 3.2–4.0 modernization
The eaco name on rubygems.org belongs to ifad, whose last release was 1.1.1 in 2017. This fork is now the maintained home, republished as eaco-abac. The require path, Eaco namespace and DSL are unchanged: gem "eaco-abac", require: "eaco". - gemspec renamed to eaco-abac.gemspec; name, homepage, metadata and authorship updated; description notes the continuation lineage - README: badges point at this repo and the eaco-abac gem; lineage note crediting ifad; supported-versions line; install section shows the require: override and the required jsonb acl migration; usage documents the ::Model top-level-constant requirement in config/authorization.rb (Zeitwerk); before_filter -> before_action in the controller example (removed in Rails 5.1); rubydoc links and dev-setup instructions modernized - tracker: repo-home/name decision recorded as resolved Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
…ending outreach Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Renaming so as to preserve the history of Eaco